<template>
    <div @click="handleClick">Child {{ count }}</div>
</template>

<script lang="ts">
export default {
    name: "Child",

    props: {
        count: {
            type: number,
            required: true,
        },
        person: {
            type: Object,
            required: true,
        },
    },
    emit: { "setCount"},
    setup(props, context) {

        const handleClick = () => {
            context.emit("setCount");
        };
        return {
            handleClick,
        }
    }
};
</script>

<style></style>
